<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .item {
      width: 100px;
      height: 400px;
      margin-top: 10px;
      background: red;
    }
  </style>
</head>

<body>
  <div id="app" class="app paa" data-num="12345" data-str="qwewqeq">
    113213123
    <button id="btn"></button>
    <div class="list">
      <div class="item" name="color" style="background: pink">11</div>
      <div class="item">22</div>
      <div class="item">33</div>
      <div class="item">44</div>
      <div class="item">55</div>
      <div class="item">66</div>
    </div>
    <script>
      const color = document.getElementsByName('color')[0];
      color.scrollIntoView({behavior: 'smooth', block: 'start'})  // 把当前dom带动画的移入视图内
      console.log(document.body.contains(color)) // 一个dom是否是另一个的后代


      const appD = document.getElementById('app')

      // innerText和outerText读取时没区别，但是写入时outerText会把自己也替换掉
      console.log(appD.innerText)  
      console.log(appD.outerText)
      
    </script>
</body>

</html>